#include<bits/stdc++.h>

using namespace std;

int main() {
    int n, m;
    cin >> n >> m;
    int f, e;
    cin >> f >> e;
    map<int, int> G;
    while (m--) {
        int x, y;
        cin >> x >> y;
        ++G[x], ++G[y];
    }
    int odd = 0;
    for (int i = 1; i <= n; i++)odd += (G[i] & 1);
    if (f == e and odd == 0 or f != e and odd == 2 and (G[f] & 1) and (G[e] & 1))
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
    return 0;
}